package com.travel.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.travel.bean.Route;
import com.travel.service.RouteService;

@Controller
@RequestMapping("route")
public class RouteController {
	/**
	 * 注入路线业务的实现
	 */
	@Resource(name="routeServiceImpl")
	private RouteService routeService;
	/**
	 * 跳转到路线管理界面
	 * @return
	 */
	@RequestMapping("/toaddroute")
	public String toaddRoute(){
		return "admin/addroute";
	}
	/**
	 * 添加路线
	 */
	@RequestMapping("/addroute.do")
	public String addRoute(Route route){
		
		routeService.saveEntry(route);
		
		return "";
	}
}
